package io.dbw.modules.business.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.dbw.modules.business.entity.SysBooksEntity;
import io.dbw.modules.business.entity.SysUserEntity;
import io.dbw.modules.business.vo.HomeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 *
 * @author lxc
 * @date 2024-03-30 16:55:49
 */
@Mapper
public interface SysBooksDao extends BaseMapper<SysBooksEntity> {
    List<SysBooksEntity> queryBooksPage(@Param("page") Page page, @Param("param") Map<String ,Object> param);

    void updateBooksStockReduce(@Param("bookId") Long bookId,@Param("num") Integer num);

    void updateBooksStockAdd(@Param("bookId") Long bookId,@Param("num") Integer num);

    HomeVO queryBooksStatistics(@Param("param") Map<String ,Object> param);
}
